s1 = '0123456789'
print(s1[1])


s2 = s1[0:6:2]
print(s2)

s3 = s1[5:6]
print(s3)

s4 = s1[0:len(s1):1]
print(s4)


s5 = s1[::2]
print(s5)

s6 = s1[::-2]
print(s6)


print(s1.find("123"))


s7 = s1.replace("123","rrr")
print(s1)
print(s7)

s8 = 'abcdefghijkgggggopq'
s9 = s8.replace('g','G')
print('s8',s8)
print('s9',s9)

s1 = 'good good good good good'
s2 = s1.replace('good','GOOD',2)
print(s2)
s2 = s2.replace('GOOD','good',1)
print(s1)
print(s2)

s2 = s1.split(' ')
print(s2)  # ['good', 'good', 'good', 'good', 'good']

list1 = ['hello','nihao','des','fwee','dfdfd']
s1 = ' '.join(list1)
print(s1) # hello nihao des fwee

s1 = ' and '.join(list1)
print(s1) # hello and nihao and des and fwee

